import axiosApi from "./AxiosApi.js";
// 不合格管理
const disqualification = {
  // 分页列表查询
  page: {
    url: `/xssc/recallDisqualification/pageQuality`,
    method: "POST"
  },
  // 展开+列表
  unfoldList: {
    url: `/xssc/recallDisqualification/unfoldList`,
    method: "GET"
  },
  // 不合格管理-不合格样本信息
  getSampleId: {
    url: `/xssc/recallDisqualification/getSampleId`,
    method: "GET"
  },
  // 不合格管理-不合格重采
  updSample: {
    url: `/xssc/recallDisqualification/updSample`,
    method: "POST"
  },
  // 不合格管理-通知信息
  informList: {
    url: `/xssc/recallDisqualification/informList`,
    method: "GET"
  },
  // 不合格管理-通知保存
  saveInform: {
    url: `/xssc/recallDisqualification/saveInform`,
    method: "POST"
  },
  // 不合格管理-召回归档保存
  updMessage: {
    url: `/xssc/recallDisqualification/updMessage`,
    method: "POST"
  },
  // 不合格管理-查看报告值
  queryReport: {
    url: `/xssc/recallDisqualification/queryReport`,
    method: "POST"
  },
  
};

// 复检管理
const recheckManage = {
  // 分页列表查询
  page: {
    url: `/xssc/recallRecheck/queryRecheck`,
    method: "POST"
  },
  // 复检样本查询
  ReviewList: {
    url: `/xssc/recallRecheck/ReviewList`,
    method: "POST"
  },
  // 复检保存
  SaveSample: {
    url: `/xssc/recallRecheck/SaveSample`,
    method: "POST"
  },
  // 获取报告值
  queryReport: {
    url: `/xssc/recallRecheck/queryReport`,
    method: "POST"
  },
  // 通知-查询
  informList: {
    url: `/xssc/recallRecheck/informList`,
    method: "GET"
  },
  // 通知-保存
  saveInform: {
    url: `/xssc/recallRecheck/saveInform`,
    method: "POST"
  },
  // 通知-状态查询
  queryRecall: {
    url: `/xssc/recallRecheck/queryRecall`,
    method: "POST"
  },
  // 通知-状态保存
  saveRecall: {
    url: `/xssc/recallRecheck/saveRecall`,
    method: "POST"
  },
  
}

export default {
  disqualification: {
    page(data) {
      return axiosApi({
        ...disqualification.page,
        // formData: true,
        data
      });
    },
    unfoldList(data) {
      return axiosApi({
        ...disqualification.unfoldList,
        // formData: true,
        data
      });
    },
    getSampleId(data) {
      return axiosApi({
        ...disqualification.getSampleId,
        // formData: true,
        data
      });
    },
    updSample(data) {
      return axiosApi({
        ...disqualification.updSample,
        // formData: true,
        data
      });
    },
    informList(data) {
      return axiosApi({
        url: `/xssc/recallDisqualification/informList?sampleId=${data.sampleId}`,
        method: "GET"
      });
    },
    // 通知保存
    saveInform(data) {
      return axiosApi({
        ...disqualification.saveInform,
        // formData: true,
        data
      });
    },
    // 状态保存
    updMessage(data) {
      return axiosApi({
        ...disqualification.updMessage,
        // formData: true,
        data
      });
    },
    // 查看报告值
    queryReport(data) {
      return axiosApi({
        ...disqualification.queryReport,
        // formData: true,
        data
      });
    },
    // 状态
    recallList(data) {
      return axiosApi({
        url: `/xssc/recallDisqualification/recallList?sampleId=${data.sampleId}`,
        method: "GET"
      });
    }
  },
  recheckManage: {
    page(data) {
      return axiosApi({
        ...recheckManage.page,
        // formData: true,
        data
      });
    },
    ReviewList(data) {
      return axiosApi({
        ...recheckManage.ReviewList,
        // formData: true,
        data
      });
    },
    SaveSample(data) {
      return axiosApi({
        ...recheckManage.SaveSample,
        // formData: true,
        data
      });
    },
    queryReport(data) {
      return axiosApi({
        ...recheckManage.queryReport,
        // formData: true,
        data
      });
    },
    informList(data) {
      return axiosApi({
        ...recheckManage.informList,
        // formData: true,
        data
      });
    },
    saveInform(data) {
      return axiosApi({
        ...recheckManage.saveInform,
        // formData: true,
        data
      });
    },
    queryRecall(data) {
      return axiosApi({
        ...recheckManage.queryRecall,
        // formData: true,
        data
      });
    },
    saveRecall(data) {
      return axiosApi({
        ...recheckManage.saveRecall,
        // formData: true,
        data
      });
    },
  }
};
